<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{{$global->web_name}}</title>
    <meta name="Keywords" content="{{$global->web_keys}}">
    <meta name="description" content="{{$global->web_intro}}" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
    <link href="{{asset('home_new/css/libs.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home_new/css/global.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home_new/css/page.css')}}" rel="stylesheet" type="text/css" />
    <link href="{{asset('home_new/css/qyg2016.css')}}" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{{asset('home/js/jquery-3.1.0.min.js')}}"></script>
    <link href="{{asset('home/js/skin/layer.css')}}" type="text/css" rel="stylesheet" />
    <link href="{{asset('home_new/css/loginPop.css')}}" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="{{asset('pulgin/layer/layer.js')}}"></script>
    <script src="http://static.geetest.com/static/tools/gt.js"></script>
    <link rel="icon" href="{{asset('home_new/favicon.ico')}}" />
</head>
<body>
<div class="global_cover">
</div>
<div class="global_header bigHead">
    <div class="header_inner clear">
        <a class="inner_logo index_icons global_gaNode" href="/">
        </a>
        <div class="account_wrap">
            <div class="header_account clear">
                <div class="account_right clear">
                    <div class="header_search clear">
                        <input id="key" class="head_searchInput" placeholder="搜点什么..." />
                        <button class="index_icons head_searchIcon" id="search">
                        </button>
                    </div>
                    <div class="account_seperate">
                    </div>
                    @if(!empty(session('user')))
                        <div class="inner_account">
                            <a href="{{url('member/userCollect')}}" target="_blank" class="account_message global_gaNode">
                                收藏 <span class="message_num"></span>
                            </a>
                            <a href="{{url('member/userFollow')}}" target="_blank" class="account_letter global_gaNode">
                                关注 <span class="letter_num"></span>
                            </a>
                            <span class="account_user clear">
                                    <a class="img_link global_gaNode clear" data-galabel="home_header_user_img"
                                       href="{{url('member/index')}}">
                                        <img class="user_img" src="{{session('user')->head_img}}" onerror="this.src='{{asset('img/100100.png')}}'"
                                             alt="会员头像" />
                                    </a>
                                    <span class="user_active smallHead">
                                        <a href="{{url('member/index')}}" class="active_name" rel="nofollow">
                                            {{session('user')->nickname}}
                                        </a>
                                        <a href="{{url('auth/logout')}}" rel="nofollow">
                                            退出
                                        </a>
                                    </span>
                                </span>
                            <div class="account_list message_list clear">
                            </div>
                            <div class="account_list sms_list clear">
                            </div>
                            <div class="sms_inform">
                                <div class="account_list  clear">
                                    <div class="sms_arrow account_list_arrow" totalnum="3">
                                    </div>
                                    <div class="sms_inform_list">
                                        <ul>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    @else
                        <div class="inner_login">
                            <a class="login_in global_gaNode" href="#"
                               data-galabel="home_header_login">
                                登录
                            </a>
                            <a class="logoutCss global_gaNode reg" href="#"
                               data-galabel="home_header_reg">
                                注册
                            </a>
                        </div>
                    @endif
                </div>
                <ul class="inner_nav">
                    <li>
                        <a class="global_gaNode" href="{{url('/')}}">
                            首页
                        </a>
                    </li>
                    @foreach($top_cate as $v)
                        <li>
                            <a class="global_gaNode" href="{{url(''.$v->cate_url.'')}}">
                                {{$v->cate_name}}
                                @if($v->cate_name=='直播')
                                    <i>优</i>
                                @endif
                            </a>
                        </li>
                    @endforeach
                    <li>
                        <a class="global_gaNode" href="#" target="_blank">
                            奇异秀
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="global_mHeader">
    {{--<div class="mHeader_menu"></div>
    <div class="mHeader_right">
        <a class="mHeader_login" href="{{url('auth')}}">登录</a>
        <a class="img_link clear" href="/user?pagetype=setbasic">
            <img class="user_img" src="images/mb_pic30.gif" alt="会员头像" />
        </a>
    </div>
    <ul class="mHeader_menuList">
        <li>
            <a class="" href="#">首页</a>
        </li>
        <li>
            <a class="" href="http://m.qiyiguo.tv/anchors">直播</a>
        </li>
        <li>
            <a class="" href="http://m.qiyiguo.tv/article">好文</a>
        </li>
        <li>
            <a class="" href="http://m.qiyiguo.tv/video">视频</a>
        </li>
        <li>
            <a class="" href="http://m.qiyiguo.tv/gallery">图库</a>
        </li>
    </ul>--}}

    @if($mobile)
        <link rel="stylesheet" href="{{asset('mobile/css/amazeui.min.css')}}">
        <link rel="stylesheet" href="{{asset('mobile/css/all-wap.css')}}">
        <link rel="stylesheet" href="{{asset('mobile/css/detail-wap.css')}}">
        <script type="text/javascript" src="{{asset('mobile/js/jquery-3.1.0.min.js')}}"></script>
        <script type="text/javascript" src="{{asset('mobile/js/amazeui.min.js')}}"></script>
        <script src="{{asset('mobile/js/libs_bd5c2.js')}}"></script>
        <script src="{{asset('mobile/js/global_4eae362a98.js')}}"></script>
        <header class="am-header i-top">
            <div class="am-header-left am-header-nav logo">
                <a href="">

                    <img src="{{asset('mobile/images/logo.png')}}">
                </a>
            </div>

            <div class="am-header-right am-header-nav i-top-pic">
                <a href="">
                    <img src="{{asset('mobile/images/fdj.png')}}">
                </a>
                <a href="">
                    <img src="{{asset('mobile/images/user.png')}}">
                </a>
            </div>
        </header>

        <nav class="am-menu  am-menu-default header-menu">
            <ul class="am-menu-nav am-avg-sm-5 i-nav">
                <li>
                    <a href="http://m.qiyiguo.tv">首页</a>
                </li>
                @foreach($top_cate as $v)
                    <li>
                        <a class="global_gaNode" href="{{url(''.$v->cate_url.'')}}">
                            {{$v->cate_name}}
                        </a>
                    </li>
                @endforeach
            </ul>
        </nav>
    @endif
</div>


<div class="wrap">
    <div id="main" style="overflow: initial;
    @if($mobile)
    margin-top:49px;
        @endif"
        >
        <div id="main_banner">
            <ul class="banner_first clear">

                <li class="banner_firstBig" >
                    <a class="global_gaNode" href="{{route($top1[0]->type->name.'.show', [$top1[0]->id])}}" target="_blank">
                        <img src="{{route('image', [trim($top1[0]->cover, '/'), '1271x805'])}}"/>
                        <div class="banner_cover">
                        </div>
                    </a>
                </li>
{{--                <li class="banner_firstBig" >
                    <a class="global_gaNode" href="http://vku.youku.com/live/play?id=11325&spm=a2h0k.8191407.0.0" target="_blank">
                        <img src="{{asset('home_new/images/special/1669-950.jpg')}}"/>
                        <div class="banner_cover">
                        </div>
                    </a>
                </li>--}}
                <li>
                    <a class="global_gaNode" href="{{url('special').'/two'}}" target="_blank">
                        <img src="{{asset('home_new/images/special/two.gif')}}"/>
                        <div class="banner_cover">
                        </div>
                    </a>
                </li>
                @for($i=2;$i<5;$i++)
                    <li>
                        <a class="global_gaNode" href="{{route($top1[$i]->type->name.'.show', [$top1[$i]->id])}}" target="_blank">
                            <img src="{{route('image', [trim($top1[$i]->cover, '/'), '635x402'])}}"/>
                            <div class="banner_cover">
                            </div>
                        </a>
                    </li>
                @endfor

            </ul>
            <div class="banner_sliderWrap">
                <div class="slider_arrow slider_arrowLeft index_icons global_gaNode">
                </div>
                <div class="slider_arrow slider_arrowRight index_icons global_gaNode"
                >
                </div>
                <div class="banner_slider">
                    <ul class="slider_list banner_sliderUl clear">
                        @if($top2)
                            @foreach($top2 as $v)
                                <li class="slider_iterm slider_item{{$loop->index+1}}">
                                    <a class="global_gaNode" href="{{route($v->type->name.'.show', [$v->id])}}"
                                       target="_blank">
                                        <img src="{{route('image', [trim($v->cover, '/'), '265x168'])}}"
                                        />
                                        <div class="secbanner_cover">
                                        </div>
                                        <div class="secbanner_title_wrap">
                                            <h2 class="secbanner_title">
                                                {{$v->title}}
                                            </h2>
                                            <!-- <span class="secbanner_tip"></span>
                                            -->
                                        </div>
                                    </a>
                                </li>
                            @endforeach
                        @endif
                    </ul>
                </div>
            </div>
        </div>

        <div id="main_video">
            <div class="video_wrap">
                <div class="index_title clear">
                    <div class="index_titleMain">
                        <a class="global_gaNode" href="{{ route('anchor.index') }}">
                            <h1>
                                正在直播
                            </h1>
                        </a>
                        <a class="global_gaNode index_titleMore" href="{{ route('anchor.index') }}">
                            MORE >
                        </a>
                    </div>
                    <ul class="index_titleList clear">
                        @foreach($anchor_cates as $cate)
                            <li>
                                <a class="global_gaNode" target="_blank" href="{{ route('anchor.cate', [$cate->cate_id]) }}">
                                    {{$cate->cate_name}}
                                </a>
                            </li>
                        @endforeach
                    </ul>
                </div>
                <div class="video_container clear">
                    @if (isset($anchor[0]) && isset($anchor[0]->anchor))
                        <div class="video_left">
                            <a class="global_gaNode" href="{{ route('anchor.show', [$anchor[0]->id]) }}">
                                <img src="{{$anchor[0]->logo ? route('image', [$anchor[0]->logo, '374x570']) : $anchor[0]->anchor->cover}}" height="570" width="374" />
                                <div class="video_titleWrap video_titleNewWrap">
                                    <div class="video_title_bq">
                                    @foreach($anchor[0]->getSimilars() as $tag)
                                        <span class="video_tip video_tip_magin">
                                            {{$tag->name}}
                                        </span>
                                    @endforeach
                                    </div>
                                    <span class="user_pic_ub">
											<img src="{{ $anchor[0]->anchor->avatar }}" alt="">
										</span>
                                    <h2 class="video_title">
                                        {{ $anchor[0]->anchor->room_name }}
                                    </h2>
                                    <p class="video_des">
                                        {{ $anchor[0]->anchor->name }}
                                        <span class="ub_numb_l">{{ num2word($anchor[0]->anchor->online) }}观众</span>
                                    </p>
                                </div>
                                <span class="video_icon index_icons">
                                    </span>
                                <div class="video_cover video_cover0">
                                </div>
                            </a>
                        </div>
                    @endif

                    <ul class="video_right">
                        @for($i = 1; $i <5; $i++)
                            @if (isset($anchor[$i]) && isset($anchor[$i]->anchor))
                                <li class="video_list{{ $i-1 }}">
                                    <a href="{{ route('anchor.show', [$anchor[$i]->id]) }}" class="global_gaNode">
                                        <img src="{{$anchor[$i]->logo ? route('image', [$anchor[$i]->logo, '353x275']) : $anchor[$i]->anchor->cover}}" width="353" height="275" />
                                        <div class="video_titleWrap video_titleNewWrap">
                                            <div class="video_title_bq">
                                            @foreach($anchor[$i]->getSimilars() as $tag)
                                                <span class="video_tip video_tip_magin">
                                                    {{$tag->name}}
                                                </span>
                                            @endforeach
                                            </div>
                                            <span class="user_pic_ub">
											    <img src="{{ $anchor[$i]->anchor->avatar }}" alt="">
										    </span>
                                            <h2 class="video_title">
                                                {{ $anchor[$i]->anchor->room_name }}
                                            </h2>
                                            <p class="video_des">
                                                {{ $anchor[$i]->anchor->name }}
                                                <span class="ub_numb_l">{{ num2word($anchor[$i]->anchor->online) }}观众</span>
                                            </p>
                                        </div>
                                        <span class="video_icon index_icons">
                                                </span>
                                        <div class="video_cover video_cover1">
                                        </div>
                                    </a>
                                </li>
                            @endif
                        @endfor
                    </ul>
                </div>

                <div class="video_series">
                    <div class="series_split_line">
                    </div>
                    <ul class="series_list clear">
                        @for($i = 5; $i <9; $i++)
                            @if (isset($anchor[$i]) && isset($anchor[$i]->anchor))
                                <li class="series_item{{$i-5}}">
                                    <a href="{{ route('anchor.show', [$anchor[$i]->id]) }}" target="_blank" class="series_itemImg global_gaNode">
                                        <img src="{{$anchor[$i]->logo ? $anchor[$i]->logo : $anchor[$i]->anchor->cover}}" />
                                        <span class="video_icon index_icons">
                                        </span>
                                        <div class="video_seriesCover">
                                        </div>
                                    </a>
                                    <a class="global_gaNode user_ub" href="{{ route('anchor.show', [$anchor[$i]->id]) }}" target="_blank">
                                        <span class="user_pic"><img src="{{ $anchor[$i]->anchor->avatar }}" alt=""></span>
                                        <h2 class="user_title">{{ $anchor[$i]->anchor->room_name }}</h2>
                                        <p> <span class="ub_name">{{ $anchor[$i]->anchor->name }}</span>
                                            <span class="ub_numb">{{ num2word($anchor[$i]->anchor->online) }}观众</span></p>
                                    </a>
                                </li>
                            @endif
                        @endfor
                    </ul>
                </div>
            </div>
        </div>

        <div id="main_plusRecom">
            <div class="plus_wrap">
                <div class="index_title clear">
                    <div class="index_titleMain">
                        <a class="global_gaNode plusRecom_title" href="{{url('video')}}">
                            <h1>
                                直播 视频
                            </h1>
                        </a>
                        <a class="global_gaNode index_titleMore" href="{{url('video')}}">
                            MORE >
                        </a>
                    </div>
                </div>
                <div class="plus_recommend">
                    <div class="recom_wrap clear">
                        <div class="recom_top clear">
                            <div class="recom_topLeft">
                                <a class="global_gaNode" href="{{route($video[0]->type->name.'.show', [$video[0]->id])}}"
                                   target="_blank">
                                    <img src="{{route('image', [trim($video[0]->cover, '/'), '834x260'])}}"
                                    />
                                    <div class="recom_titleWrap">
                                        <h3 class="recom_title">
                                            {{$video[0]->title}}
                                        </h3>
                                        <span class="recom_total index_icons">
                                                    {{$video[0]->visit_count}}
                                                </span>
                                    </div>
                                    <div class="plus_cover">
                                    </div>
                                </a>
                            </div>
                            <div class="recom_topRight">
                                <a class="global_gaNode" href="{{route($video[1]->type->name.'.show', [$video[1]->id])}}"
                                   target="_blank">
                                    <img src="{{route('image', [trim($video[1]->cover, '/'), '265x261'])}}"
                                    />
                                    <div class="recom_titleWrap">
                                        <h3 class="recom_title">
                                            {{$video[1]->title}}
                                        </h3>
                                        <span class="recom_total index_icons">
                                                    {{$video[1]->visit_count}}
                                                </span>
                                    </div>
                                    <div class="plus_cover plus_coverR">
                                    </div>
                                </a>
                            </div>

                        </div>
                        <div class="recom_list" style="width:100%">
                            @for($i=2;$i<6;$i++)
                                @if(isset($video[$i]))
                                    <li class="recom_item{{$i-2}}">
                                        <a class="global_gaNode" href="{{route($video[$i]->type->name.'.show', [$video[$i]->id])}}"
                                           target="_blank">
                                            <img src="{{route('image', [trim($video[$i]->cover, '/'), '265x155'])}}"
                                            />
                                            <div class="plus_cover plus_coverBottom">
                                            </div>
                                        </a>
                                        <a class="global_gaNode" href="{{route($video[$i]->type->name.'.show', [$video[$i]->id])}}"
                                           target="_blank">
                                            <h3 class="recom_title">
                                                {{$video[$i]->title}}
                                            </h3>
                                        </a>
                                        <span class="recom_total index_icons">
                                            {{$video[$i]->visit_count}}
                                        </span>
                                    </li>
                                @endif
                            @endfor

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 深度好文 -->
        <div id="main_plusArt">
            <div class="plus_article">
                <div class="index_title clear">
                    <div class="index_titleMain">
                        <a class="global_gaNode plusArt_title" href="{{url('article')}}">
                            <h1> 直播 好文 </h1>
                        </a>
                        <a class="global_gaNode index_titleMore" href="{{url('article')}}">
                            MORE >
                        </a>
                    </div>
                </div>
                <div class="art_wrap clear">
                    <ul class="art_list clear">
                        @foreach($article1 as $v)
                            <li class="article_item article_item{{$loop->index}}">
                                <a class="global_gaNode" href="{{route($v->type->name.'.show', [$v->id])}}" >
                                    <div class="img_box">
                                        <img src="{{route('image', [trim($v->cover, '/'), '265x155'])}}"/>
                                        <div class="plus_article_cover">
                                        </div>
                                    </div>
                                    <h3 class="article_title yellow_line">
                                        {{mb_substr($v->title,0,23)}}
                                    </h3>
                                    <p class="article_content">
                                        {{mb_substr($v->abstract,0,70)}}
                                    </p>
                                    <span class="article_total index_icons">
                                            {{$v->visit_count}}
                                        </span>
                                </a>
                            </li>
                        @endforeach
                    </ul>
                    <div class="art_listArrow">
                                <span class="page_arrow arrow_left index_icons global_gaNode">
                                </span>
                        <span class="page_arrow arrow_right index_icons unclick global_gaNode"
                        >
                                </span>
                    </div>
                </div>
            </div>
            <div class="plus_sliderWrap">
                <div class="plus_sliderSkin">
                    <div class="plus_slider">
                        <div class="slider_arrow slider_arrowLeft index_icons global_gaNode">
                        </div>
                        <div class="slider_arrow slider_arrowRight index_icons global_gaNode"
                        >
                        </div>
                        <div class="slider_coverLeft">
                        </div>
                        <div class="slider_coverRight">
                        </div>
                        <ul class="slider_list plus_sliderList clear">
                            @foreach($article2 as $v)
                                <li class="slider_item slider_item7">
                                    <a class="global_gaNode" href="{{route($v->type->name.'.show', [$v->id])}}"
                                       target="_blank" title="{{$v->title}}">
                                        <img class="slider_img" src="{{route('image', [trim($v->cover, '/'), '360x228'])}}"
                                        />
                                        <div class="plus_article_cover">
                                        </div>
                                        <span class="slider_tip" >
                                                {{mb_substr($v->title,0,20)}}
                                            </span>
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div id="main_phone">
            <div class="phone_wrap clear">
                <div class="index_title clear">
                    <div class="index_titleMain">
                        <a class="global_gaNode plusArt_title" href="{{route('galleries.index')}}"
                           target="_blank">
                            <h1>
                                直播 图库
                            </h1>
                        </a>
                        <a class="global_gaNode index_titleMore" href="{{route('galleries.index')}}"
                           target="_blank">
                            MORE >
                        </a>
                    </div>
                </div>
                <ul class="phone_component list_pic_3 clear">

                    <li class="each_0">
                        <a href="{{route($gallery[0]->type->name.'.show', [$gallery[0]->id])}}" target="_blank">
                            <img src="{{route('image', [trim($gallery[0]->cover, '/'), '560x450'])}}"/>
                        </a>
                    </li>
                    <li class="each_1">
                        <a href="{{route($gallery[1]->type->name.'.show', [$gallery[1]->id])}}" target="_blank">
                            <img src="{{route('image', [trim($gallery[1]->cover, '/'), '560x225'])}}"/>
                        </a>
                    </li>
                    <li class="each_2">
                        <a href="{{route($gallery[2]->type->name.'.show', [$gallery[2]->id])}}" target="_blank">
                            <img src="{{route('image', [trim($gallery[2]->cover, '/'), '280x225'])}}"/>
                        </a>
                    </li>
                    <li class="each_3">
                        <a href="{{route($gallery[3]->type->name.'.show', [$gallery[3]->id])}}" target="_blank">
                            <img src="{{route('image', [trim($gallery[3]->cover, '/'), '280x225'])}}"/>
                        </a>
                    </li>
                </ul>
                <ul class="phone_listWrap clear">
                    @for($i=4;$i<8;$i++)
                        @if (isset($gallery[$i]))
                            <li class="phone_listItem phone_listItem{{$i-4}}">
                                <a class="global_gaNode" href="{{route($gallery[$i]->type->name.'.show', [$gallery[$i]->id])}}" target="_blank">
                                    <img class="phone_listImg" src="{{route('image', [trim($gallery[$i]->cover, '/'), '265x205'])}}"
                                    />
                                    <div class="lab_title_wrap">
                                        <h2 class="secbanner_title">
                                            {{$gallery[$i]->title}}
                                        </h2>
                                    </div>
                                </a>
                            </li>
                        @endif
                    @endfor
                </ul>
            </div>
        </div>
    </div>
</div>
<div class="global_footer">
    <div class="foot-line"></div>
    <div class="footer_inner">
        <div class="inner_link clear">
            <dl>
                <p class="logo_footer index_icons"></p>
            </dl>
            <dl>
                <dt>奇异果资讯</dt>
                <dd>
                    @foreach($qyg as $v)
                        <a href="{{url('/qyg').'/'.$v->cate_url}}">{{$v->cate_name}}</a>
                    @endforeach
                </dd>
            </dl>
            <dl>
                <dt>关于我们</dt>
                <dd>
                    @foreach($about as $v)
                        <a href="{{url('/about').'/'.$v->cate_url}}">{{$v->cate_name}}</a>
                    @endforeach
                </dd>
            </dl>
            <dl class="footer_follow">
                <dt>关注我们</dt>
                <dd>
                    <a class="global_gaNode"
                       target="_blank" rel="nofollow" href="http://weibo.com/u/5897732591">
                        新浪微博
                    </a>
                    <a class="global_gaNode"
                       target="_blank" href="{{url('/about').'/joinus'}}">
                        联系我们
                    </a>
                </dd>
            </dl>
            <dl class="footer_wechat">
                <dt> 官方微信 </dt>
                <dd class="wechat_img"> </dd>
            </dl>
            <dl class="footer_appDownload">
                <dt> Q群196241900 </dt>
                <dd class="app_img"> </dd>
            </dl>
        </div>
        <div class="inner_tag clear">
            <div>
                <ul>
                    <span>友情链接</span>
                </ul>
            </div>
            <div class="inner_tag_seolink">
                <ul>
                    @foreach($links as $v)
                        <li>
                            <a class="global_gaNode" href="{{$v->link_url}}" target="_blank">{{$v->name}}</a>
                        </li>
                    @endforeach
                </ul>
            </div>
        </div>
        <div class="footer_message">
            <div class="footer_pcMsg clear">
                <div class="inner_copyr">
                            <span class="inner_no">
                                <a class="global_gaNode"
                                   target="_blank" rel="nofollow">
                                    © 2016 QIYIGUO | 奇异果聚合 | 昆明尚合科技有限公司 | 滇ICP备12006567号-20
                                </a>
                            </span>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
<script src="{{asset('home_new/js/libs.js')}}"></script>
<script src="{{asset('home_new/js/page.js')}}"></script>
<script>
    $(function() {
        Z.use('index/page');
        Z.use('global/header');
        Z.use('footer/footer');
    });
</script>

<script>


    $(function() {

        //注册
        $('.reg').click(function(){
            location.href = "{{url('register')}}";
        });
        var url = "{{url('auth/startCaptcha')}}";
        var reg_url = "{{url('register')}}";
        var forget_url = "{{url('forget')}}";
        var qq_login = "{{url('auth/qq')}}";
        var wx_login = "{{url('auth/weixinWeb')}}";
        var wb_login = "{{url('auth/weibo')}}";
        var login = {
            init: function () {

                $('.login_in').click(function () {

                    layer.open({
                        type: 1,
                        title: false,
                        area: ['auto', 'auto'],
                        shift: 'left', //从左动画弹出
                        closeBtn: 0,
                        shadeClose: true,
                        zIndex: 899990,
                        content: '<div class="login-pop"data-point="dlk"><div class="login-pop-close"></div><div class="login-pop-tab"><ul><li><a href="#" class="t-login current">登录</a></li><li><a href="' + reg_url + '" target="_blank">注册</a></li></ul></div><div class="login-pop-cont clearfix"><div class="c-item clearfix popLogin"><form method="post" action=""><input type="hidden" name="name" value="login"><input type="hidden" name="dopost" value="login"><input type="hidden" name="gourl" value=""><p><input class="ipt" type="text" name="userid" id="phone" placeholder="电话号码"></p><p><input class="ipt" type="password" name="pwd" id="password" placeholder="密码"></p><div class="toreg clearfix"><input class="btn-sub"type="button"value="登录" id="popup-submit"><p>没有账号？<a href="' + reg_url + '" title="马上注册" target="_blank">马上注册</a></p></div></form></div><div class="c-oth"><p>用第三方账号直接登录</p><div><a href="' + qq_login + '" class="btn-qq" title="QQ账号登录"data-point-2="qq"><span class="dy-icon dy-sina"></span><span>QQ账号登录</span></a></div><div><a href="' + wx_login + '" class="btn-wx" title="微信登录"data-point-2="qq"><span class="dy-icon dy-wx"></span><span>微信登录</span></a></div><div><a href="' + wb_login + '" class="btn-sina" title="微博登录"data-point-2="sina"><span class="dy-icon dy-qq"></span><span>微博登录</span></a></div><p class="forget-pass"><a href="' + forget_url + '" target="_blank">忘记密码？</a></p></div></div></div>'
                    })
                    $(".t-login").on("click", function () {
                        $(".t-login").addClass("current");
                        $(".t-reg").removeClass("current");
                        $(".popLogin").removeClass("hide");
                        $(".popReg").addClass("hide");
                    })
                    $(".t-reg").on("click", function () {
                        $(".t-reg").addClass("current");
                        $(".t-login").removeClass("current");
                        $(".popLogin").addClass("hide");
                        $(".popReg").removeClass("hide");
                    })
                    $(".login-pop-close").on("click", function () {
                        layer.closeAll();
                    })

                    @if(empty(session('login_sign')))
                        document.onkeydown = function(e){

                        var ev = document.all ? window.event : e;
                        if(ev.keyCode==13) {
                            if($('#remember').is(':checked')){
                                var remember = 1;
                            }else{
                                var remember = 0;
                            }
                            var phone = $("#phone").val();
                            var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
                            if(!myreg.test(phone))
                            {
                                layer.msg('请输入有效的手机号码！');
                                return;
                            }
                            var password = $("#password").val();
                            if(password.length == 0){

                                layer.msg('密码不能为空！');
                                return;
                            }
                            $.ajax({
                                url: "{{url('auth/quickLogin')}}",
                                type: "post",
                                // dataType: "json",
                                data: {
                                    // 用户名和密码等其他数据，自己获取，不做演示
                                    phone: phone,
                                    password: password,
                                    remember: remember,
                                    _token: "{{csrf_token()}}",
                                },
                                // 这里是正确返回处理结果的处理函数
                                // 假设你就返回了1，2，3
                                // 当然，正常情况是返回JSON数据
                                success: function (result) {
                                    if (result == 'success') {
                                        location.reload();
                                    } else {
                                        layer.alert(result,{icon: 2},function () {
                                            location.reload();
                                        });
                                    }
                                }
                            });
                            // 提交验证码信息，比如登陆页面，你需要提交登陆信息，用户名和密码等登陆数据

                        }
                    }



                    $("#popup-submit").click(function () {
                        if($('#remember').is(':checked')){
                            var remember = 1;
                        }else{
                            var remember = 0;
                        }
                        var phone = $("#phone").val();
                        var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
                        if(!myreg.test(phone))
                        {
                            layer.msg('请输入有效的手机号码！');
                            return;
                        }
                        var password = $("#password").val();
                        if(password.length == 0){
                            layer.msg('密码不能为空！');
                            return;
                        }
                        $.ajax({
                            url: "{{url('auth/quickLogin')}}",
                            type: "post",
                            // dataType: "json",
                            data: {
                                // 用户名和密码等其他数据，自己获取，不做演示
                                phone: phone,
                                password: password,
                                remember: remember,
                                _token: "{{csrf_token()}}",
                            },
                            // 这里是正确返回处理结果的处理函数
                            // 假设你就返回了1，2，3
                            // 当然，正常情况是返回JSON数据
                            success: function (result) {
                                if (result == 'success') {
                                    location.href = "{{url('auth/success')}}";
                                } else {
                                    layer.alert(result,{icon: 2},function () {
                                        location.reload();
                                    });
                                }
                            }
                        });

                    });


                    @else




                    // 代码详细说明
                    var handlerPopup = function (captchaObj) {
                        // 注册提交按钮事件，比如在登陆页面的登陆按钮
                        $("#popup-submit").click(function () {
                            // 此处省略在登陆界面中，获取登陆数据的一些步骤
                            // 先校验是否点击了验证码

                            var validate = captchaObj.getValidate();
                            var phone = $("#phone").val();
                            var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
                            if (!myreg.test(phone)) {
                                layer.msg('请输入有效的手机号码！');
                                return;
                            }
                            var password = $("#password").val();
                            if (password.length == 0) {
                                layer.msg('密码不能为空！');
                                return;
                            }
                            if (!validate) {
                                layer.msg('请先完成验证！');
                                return;
                            }
                            // 提交验证码信息，比如登陆页面，你需要提交登陆信息，用户名和密码等登陆数据
                            $.ajax({
                                url: "{{url('auth/verifyLogin')}}",
                                type: "post",
                                // dataType: "json",
                                data: {
                                    // 用户名和密码等其他数据，自己获取，不做演示
                                    phone: phone,
                                    password: password,
                                    remember: 0,
                                    _token: "{{csrf_token()}}",
                                    geetest_challenge: validate.geetest_challenge,
                                    geetest_validate: validate.geetest_validate,
                                    geetest_seccode: validate.geetest_seccode
                                },
                                // 这里是正确返回处理结果的处理函数
                                // 假设你就返回了1，2，3
                                // 当然，正常情况是返回JSON数据
                                success: function (result) {
                                    if (result == 'success') {
                                        location.reload();
                                    } else {
                                        layer.alert(result,{icon: 2});
                                    }
                                }, error: function (data) {
                                    console.log(data)
                                }
                            });
                        });
                        captchaObj.bindOn("#popup-submit");
                        captchaObj.appendTo(".login-pop");
                        geetest = captchaObj;
                    };

                    $.ajax({
                        // 获取id，challenge，success（是否启用failback）
                        url: url + "/" + (new Date()).getTime(), // 加随机数防止缓存
                        type: "get",
                        dataType: "json",
                        success: function (data) {
                            // 使用initGeetest接口
                            // 参数1：配置参数
                            // 参数2：回调，回调的第一个参数验证码对象，之后可以使用它做appendTo之类的事件
                            initGeetest({
                                gt: data.gt,
                                challenge: data.challenge,
                                product: "popup", // 产品形式，包括：float，embed，popup。注意只对PC版验证码有效
                                offline: !data.success // 表示用户后台检测极验服务器是否宕机，与SDK配合，用户一般不需要关注
                            }, handlerPopup);
                        }
                    });

                @endif
                });
            }
        }
        login.init();
    });
    $(function(){
        document.onkeydown = function(e){
            var ev = document.all ? window.event : e;
            if(ev.keyCode==13) {
                var phone = $("#phone").val();
                var pwd = $("#password").val();
                if(phone.length==0){
                    return;
                }
                var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
                if(!myreg.test(phone))
                {
                    layer.msg('请输入有效的手机号码！')
                    return;
                }
                if(pwd.length<6){
                    layer.msg('密码格式不正确！')
                    return;
                }
                return geetest.show();
            }
        }

    })
    //搜索
    $(function(){
        $('#search').click(function(){
            search();
        })
        $('#key').focus(function(){
            //$(this).val('');
            document.onkeydown = function(e){
                var ev = document.all ? window.event : e;
                if(ev.keyCode==13) {
                    search();
                }
            }
        })
    })
    function search(){
        var key = $('#key').val();
        if(key!=null||key!=''||key!=undefined){
            var uri = "{{ route('search') }}"+'/'+key;
        }else{
            var uri = "{{ route('search') }}";
        }
        $('body').append('<a href="" id="goto" target="_blank"></a>');

        $('#goto').attr('href', uri);
        $('#goto').get(0).click();
    }
</script>


<span style="display:none;">
    <!--统计代码-->
{!! $global->count_code !!}
<!--推送代码-->
    {!! $global->push_code !!}
        </span>
</body>

</html>